//
//  UserProfileManager.h
//  huimei
//
//  Created by fengyn on 16/2/19.
//  Copyright © 2016年 lexingsoft. All rights reserved.
//

#import <Foundation/Foundation.h>

@class UserProfileEntity;
@interface UserProfileManager : NSObject

+ (instancetype)sharedInstance;

///加载从网络查询用户信息如果本地就加载本地
- (void)loadUserInfoByUsername:(NSString *)username success:(void(^)(UserProfileEntity * entity))success;

/*
 *  获取本地用户信息
 */
- (UserProfileEntity*)getUserProfileByUsername:(NSString*)username;

/*
 *  获取当前用户信息
 */
- (UserProfileEntity*)getCurUserProfile;

/*
 *  根据username获取当前用户昵称
 */
- (NSString*)getNickNameWithUsername:(NSString*)username;

@end

@interface UserProfileEntity : NSObject

+ (instancetype)entityWithDic:(NSDictionary*)dic;

@property (nonatomic,strong) NSString *objectId;
@property (nonatomic,strong) NSString *username;
@property (nonatomic,strong) NSString *nickname;
@property (nonatomic,strong) NSString *imageUrl;

@end